package com.ruoyi.experiment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.experiment.mapper.RouterMapper;
import com.ruoyi.experiment.domain.Router;
import com.ruoyi.experiment.service.IRouterService;

/**
 * 路由器Service业务层处理
 * 
 * @author 邓鑫
 * @date 2023-07-29
 */
@Service
public class RouterServiceImpl implements IRouterService 
{
    @Autowired
    private RouterMapper routerMapper;

    /**
     * 查询路由器
     * 
     * @param routerId 路由器主键
     * @return 路由器
     */
    @Override
    public Router selectRouterByRouterId(Long routerId)
    {
        return routerMapper.selectRouterByRouterId(routerId);
    }

    /**
     * 查询路由器列表
     * 
     * @param router 路由器
     * @return 路由器
     */
    @Override
    public List<Router> selectRouterList(Router router)
    {
        return routerMapper.selectRouterList(router);
    }

    /**
     * 新增路由器
     * 
     * @param router 路由器
     * @return 结果
     */
    @Override
    public int insertRouter(Router router)
    {
        return routerMapper.insertRouter(router);
    }

    /**
     * 修改路由器
     * 
     * @param router 路由器
     * @return 结果
     */
    @Override
    public int updateRouter(Router router)
    {
        return routerMapper.updateRouter(router);
    }

    /**
     * 批量删除路由器
     * 
     * @param routerIds 需要删除的路由器主键
     * @return 结果
     */
    @Override
    public int deleteRouterByRouterIds(Long[] routerIds)
    {
        return routerMapper.deleteRouterByRouterIds(routerIds);
    }

    /**
     * 删除路由器信息
     * 
     * @param routerId 路由器主键
     * @return 结果
     */
    @Override
    public int deleteRouterByRouterId(Long routerId)
    {
        return routerMapper.deleteRouterByRouterId(routerId);
    }
}
